package com.yueyang.sojourn.server.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author yemingxing
 * @summary 附件信息dto
 * @Copyright (c) 2020, Yueyang Group All Rights Reserved.
 * @since 2020-02-12 23:56
 */
@ApiModel("附件信息DTO")
@Data
public class AttachDto {

    /**
     * 文件服务器bucket
     */
    @ApiModelProperty(value = "文件服务器bucket", required = true)
    @NotBlank(message = "[bucket]不能为空")
    private String bucket;

    /**
     * 文件上传后返回的key
     */
    @ApiModelProperty(value = "文件上传后返回的key", required = true)
    @NotBlank(message = "[fileKey]不能为空")
    private String fileKey;

    /**
     * 文件名
     */
    @ApiModelProperty(value = "文件名", required = true)
    @NotBlank(message = "[文件名]不能为空")
    @Size(max = 100, message = "[文件名]最大支持100字")
    private String name;
}
